package com.bizzard.pet.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.bizzard.basic.domain.BaseDomain;
import com.bizzard.org.domain.Shop;
import com.bizzard.user.domain.User;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 实体类：
 */
public class Pet extends BaseDomain{

    private static final long serialVersionUID = 1L;

    private String name;
    private String costprice;
    private BigDecimal saleprice;
    /**
     * 类型id
     */
    private Long typeId;
    private PetType type;
    private String resources;
    /**
     * 状态：0下架 1上架
     */
    private Integer state;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date offsaletime;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date onsaletime;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date createtime = new Date();
    /**
     * 店铺Id 如果被领养店铺id为null
     */
    private Long shopId;
    private Shop shop;
    /**
     * 如果被领养为领养用户id
     */
    private Long userId;
    private User user;
    private Long searchMasterMsgId;

    private PetDetail petDetail;

    public PetDetail getPetDetail() {
        return petDetail;
    }

    public void setPetDetail(PetDetail petDetail) {
        this.petDetail = petDetail;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCostprice() {
        return costprice;
    }

    public void setCostprice(String costprice) {
        this.costprice = costprice;
    }

    public BigDecimal getSaleprice() {
        return saleprice;
    }

    public void setSaleprice(BigDecimal saleprice) {
        this.saleprice = saleprice;
    }

    public Long getTypeId() {
        return typeId;
    }

    public Date getOffsaletime() {
        return offsaletime;
    }

    public void setOffsaletime(Date offsaletime) {
        this.offsaletime = offsaletime;
    }

    public Date getOnsaletime() {
        return onsaletime;
    }

    public void setOnsaletime(Date onsaletime) {
        this.onsaletime = onsaletime;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public void setTypeId(Long typeId) {
        this.typeId = typeId;
    }

    public String getResources() {
        return resources;
    }

    public void setResources(String resources) {
        this.resources = resources;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }


    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getSearchMasterMsgId() {
        return searchMasterMsgId;
    }

    public void setSearchMasterMsgId(Long searchMasterMsgId) {
        this.searchMasterMsgId = searchMasterMsgId;
    }

    public PetType getType() {
        return type;
    }

    public void setType(PetType type) {
        this.type = type;
    }

    public Shop getShop() {
        return shop;
    }

    public void setShop(Shop shop) {
        this.shop = shop;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @Override
    public String toString() {
        return "Pet{" +
        ", name=" + name +
        ", costprice=" + costprice +
        ", saleprice=" + saleprice +
        ", typeId=" + typeId +
        ", resources=" + resources +
        ", state=" + state +
        ", offsaletime=" + offsaletime +
        ", onsaletime=" + onsaletime +
        ", createtime=" + createtime +
        ", shopId=" + shopId +
        ", userId=" + userId +
        ", searchMasterMsgId=" + searchMasterMsgId +
        "}";
    }
}
